package net.luoran.dvm.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import net.luoran.dvm.entity.SysFileDO;
import net.luoran.dvm.mapper.SysFileMapper;
import net.luoran.dvm.service.SysFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 文件 服务实现类
 * </p>
 *
 * @author MyBatisPlusGenerater
 * @since 2020-10-29
 */
@Service
@Transactional
public class SysFileServiceImpl extends ServiceImpl<SysFileMapper, SysFileDO> implements SysFileService {

    @Autowired
    private SysFileMapper sysFileMapper;

    @Override
    public Integer removeByFileId(String fileId) {
        return sysFileMapper.deleteById(fileId);
    }

    @Override
    public void saveSysFile(SysFileDO sysFileDO) {
        sysFileMapper.insert(sysFileDO);
    }
}
